import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:series_play/generated/assets.dart';
import 'package:series_play/widget/app_color.dart';
import 'package:series_play/widget/app_image.dart';
import 'package:series_play/widget/app_text.dart';

class MineCell extends StatelessWidget {
  const MineCell({
    this.icon,
    required this.title,
    required this.onTap,
    this.hint,
    super.key,
  });

  final String? icon;
  final String title;
  final String? hint;
  final VoidCallback onTap;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      behavior: HitTestBehavior.translucent,
      child: Container(
        padding: const EdgeInsets.symmetric(horizontal: 16).w,
        height: 44.w,
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            icon == null ? Container() : AppImage(icon!, size: 18),
            icon == null ? Container() : 10.horizontalSpace,
            AppText(title, color: Colors.white),
            const Spacer(),
            AppText(hint ?? '', color: AppColor.white_40, fontSize: 12),
            12.horizontalSpace,
            AppImage(
              Assets.imagesIcArrowRight,
              width: 9,
              height: 18,
              color: AppColor.white_40,
            ),
          ],
        ),
      ),
    );
  }
}
